package com.gyp.model.common;

public enum ResultCode implements IResultCode {

    SUCCESS("200", "操作成功"),

    FAILURE("400", "业务异常"),
    AUTH_FAIL("401", "未登录或者token已过期"),
    AUTH_THROITY_FAIL("403", "未授权"),
    NOT_FOUND("404", "服务未找到"),
    USER_PASSWORD_ERROR("999001001", "用户名或密码错误"),
    ERROR("500", "服务异常"),
    PARAMS_IS_NULL("999001000", "参数为空错误"),
    PARAMS_NOT_COMPLETE("999001010", "参数不全"),
    PARAMS_TYPE_ERROR("999001020", "参数类型匹配错误"),
    HTTP_REQUEST_METHOD_ERROR("999006020", "请求方式异常"),
    PARAMS_IS_INVALID("999001030", "参数无效"),
    DATA_NOT_FOUND("999002000", "数据未找到"),
    SYSTEM_INNER_ERROR("999005060", " 系统内部错误"),
    ;

    final String code;
    final String msg;

    private ResultCode(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
